<#include "/tags/likeListTag.ftl">
<#include "/tags/updatedSinceTag.ftl">
<#include "/tags/userTagsTag.ftl">

<#macro newsContent title SEOLink newsUpdatedSince likeCount newsId youLikeThis intro tags body="" showComments="on">
	<div class="wallActivityContent">
        <p><a href="${rc.contextPath}/news/entry/${newsId}/${SEOLink?replace(' ','-')}" class="newsTitle">${title}</a><@security.authorize ifAnyGranted="ROLE_ADMIN"><a href="${rc.contextPath}/admin/editNews.html?id=${newsId}">&nbsp;[Chỉnh sửa nội dung]</a></@security.authorize></p>        
        <p class="timeLikeComment onWall">
        	<@updatedSince minutes=newsUpdatedSince prefix="page.dashboard.updateSince"/> 
        	<@security.authorize ifAnyGranted="ROLE_USER">
        	${youLikeThis?string("<a href='javascript:unlike(\"NEWS\", ${newsId});'> &bull; Bỏ Thích</a>","<a href='javascript:like(\"NEWS\", ${newsId});'> &bull; Thích</a>")}        	
        	<a <#if (showComments=="on")>href="#" class="commentCount" rel="NEWS${newsId}"<#else>href="${rc.contextPath}/news/entry/${newsId}/${SEOLink?replace(' ','-')}"</#if>> &bull; Ý kiến</a>
        	</@security.authorize>
        </p>
        <#if (likeCount > 0)>
        <p class="likeListUser">
        	<a class="entryLikeThisHover" href="#"></a>
        	<@likeList likeCount=likeCount entryId=newsId youLikeThis=youLikeThis component="NEWS" />        	         	
        </p>                                
        </#if>
        <div class="clearthis"></div>
        <#if (tags?size > 0)>
        <p class="tagNews"><span class="bgPos">Tags: </span>
        	<#list tags as tag>	
        		<@userTags tag.id tag.tagName tag.SEOLink/>
        	</#list>
        </p>
        </#if>
        <div class="contentNews">
        	${intro}
        	<#if (body?? && body?length > 0)>
        		${body}
        	</#if>
        </div>
    </div>
</#macro>